﻿@model Home.Domain.Entities.News
@{
    ViewBag.Title = "CMS管理系统";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
    string controllerName = Request.RequestContext.RouteData.Values["controller"].ToString();
}

@section head{
   <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/ueditor-1.2.0/editor_config.js"></script>
<script type="text/javascript" src="/Scripts/ueditor-1.2.0/editor_all.js"></script>
<link rel="stylesheet" href="/Scripts/ueditor-1.2.0/themes/default/ueditor.css"/>
 <script src="/Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
}
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="partner">
	@{Html.RenderPartial("_Manager");}
	<div id="content" class="clear mainwide">
        <div class="clear box">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head"><h2>编辑@(ViewBag.ColumnTitle)</h2></div>
                <div class="sect">
                    @using (Html.BeginForm())
                    {
                   @* @Html.ValidationSummary(true)*@
						@*<div class="wholetip clear"><h3>1、登录信息</h3></div>*@
                        <div class="field">
                            <label>标题</label>
                           @Html.TextBoxFor(model => model.Title, new { @class = "f-input" })
                            <div class="clear"></div>
                          @Html.ValidationMessageFor(model => model.Title)
                        </div>
                        <div class="field">
                            <label>分类</label>
                           @Html.DropDownListFor(model => model.PNewsId, ViewBag.PNews as SelectList, new { @class = "f-input" })
                            <div class="clear"></div>
                        </div>
                        <div class="field">
                            <label>内容</label>


                     @Html.TextAreaFor(model => model.Body, new { @class = "f-editor" })
                            <script type="text/javascript">
                                var editor = new baidu.editor.ui.Editor({
                                    textarea: 'Body',
                                    UEDITOR_HOME_URL: '/Scripts/ueditor-1.2.0/',
                                    iframeCssUrl: '/Scripts/ueditor-1.2.0/themes/default/iframe.css'
                                });
                                editor.render("Body");
</script>
                           <div class="clear"></div>
                            @Html.ValidationMessageFor(model => model.Body)
                        </div>
                        <div class="field">
                            <label>日期</label>
                            @Html.TextBox("CreateDate", string.Format("{0:yyyy-MM-dd}",Model.CreateDate), new { @class = "h-input",@onClick="WdatePicker()" })
                            <div class="clear"></div>
                          @Html.ValidationMessageFor(model => model.CreateDate)
                        </div>
                        <div class="act">
                            <input type="submit" value="保存" name="commit" id="partner-submit" class="formbutton"/>
                        </div>
                    }
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>

<div id="sidebar">
</div>

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->